import { Component, OnInit, ChangeDetectionStrategy, Output, EventEmitter, Input } from '@angular/core';

@Component({
  selector: 'app-rate-item',
  templateUrl: './rate-item.component.html',
  styleUrls: ['./rate-item.component.less'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class RateItemComponent implements OnInit {
  @Input() rateItemCls = 'xm-rate-item';
  @Output() private itemHover = new EventEmitter<boolean>();
  @Output() private itemClick = new EventEmitter<boolean>();

  constructor() {}

  ngOnInit(): void {}
  clickRate(isHalf: boolean): void {
    this.itemClick.emit(isHalf);
  }
  hoverRate(isHalf: boolean): void {
    this.itemHover.emit(isHalf);
  }
}
